Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding is_poll to the discussion table #91

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nodeloc
Copy link

@nodeloc nodeloc commented Feb 27, 2024

Adding is_poll to the discussion table significantly improves the efficiency of polls and avoids redundant queries.

Confirmed

  • [√ ] Frontend changes: tested on a local Flarum installation.
  • [√ ] Backend changes: tests are green (run composer test).

@dsevillamartin
Copy link
Member

This only handles the initial discussion creation with a post. If I remember correctly, polls can now be deleted as well.

Also not sure I love this, but I also can't think of another way to achieve it, since the poll data is present on the first post relationship anyways.

Perhaps the column should also be has_polls to be more precise, if we choose to go with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants